<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant">
<div class="row">
    <div class="top">首页>审批申请</div>
    <form class="form-horizontal">
        <div class="content addapply">
            <div class="box larg-box">
                <h1>电催反馈</h1>
                <div class="list-block">
                        客户姓名：{$overdue_log.name}
                    <div class="form-group">
                        <label class="col-sm-2 control-label">电催结果</label>
                        <div class="col-sm-5">
                            <input type="hidden" id="overdue-id" value="{$overdue_id}">
                            <select id="execute-type" name="execute_type" class="form-control">
                                <option value="1">未跟进</option>
                                <option value="2">再跟进</option>
                                <option value="3">失联</option>
                                <option value="4">无还款意愿</option>
                                <option value="5">跳票客户</option>
                                <option value="6">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注</label>

                        <div class="col-sm-10">
                            <textarea id="feedback" class="form-control" rows="5" cols="20" name="feedback"
                                      placeholder="反馈信息"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <a href="{:U('task/tele')}" type="button" class="btn btn-default" >返回</a>
                    <button id="sub-feedback" type="button" class="btn btn-primary">提交反馈</button>
                </div>
            </div>
        </div>

    </form>

<div class="list-block">
    <table class="table table-bordered">
        <tr>
            <th>电催结果</th>
            <th>备注</th>
            <th>电催人</th>
            <th>时间</th>
        </tr>
        <volist name="overdue_log" id="overdue_log">
            <tr>
            <td>
                <switch  name="overdue_log.execute_type">
                    <case value="1">未跟进</case>
                    <case value="2">再跟进</case>
                    <case value="3">失联</case>
                    <case value="4">无还款意愿</case>
                    <case value="5">跳票客户</case>
                    <case value="6">其他</case>
                </switch>
            </td>
            <td>{$overdue_log.feedback}</td>
            <td>{$overdue_log.name}</td>
            <td>{$overdue_log.create_time|date='Y-m-d H:i:s', ###}</td>
            </tr>
        </volist>
    </table>
</div>

</div>
</div>

<script type="text/javascript">
    // 提交反馈信息
    $('#sub-feedback').click(function () {
        var overdueId = $('#overdue-id').val();
        var executeType = $('#execute-type').val();
        var feedback = $('#feedback').val();

        $.ajax({
            type: "POST",
            url: "__URL__/telbak",
            data: {
                overdue_id: overdueId,
                execute_type: executeType,
                feedback: feedback
            },
            success: function (msg) {
                console.log(msg);
                if (msg > 1) {
                    alert('添加反馈成功');
                    window.location.reload();
                    return false;
                } else {
                    msg = $.parseJSON(msg);
                    alert(msg.message);
                }
            }
        });

        $(this).attr('data-dismiss', 'modal');
    });
</script>
</body>
</html>